<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <div id="app">
     姓：<input type="text" v-model="name1">
     名：<input type="text" v-model="name2"> 
     <p>  全名：{{getName}}</p>
  </div>
 
  <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
  <script>
    const app = new Vue({
      el:'#app',
      data : {
        name1 : ''  ,
        name2 : '' ,
      },
      computed:{
        getName(){
          console.log(666);
          return this.name1 + ' ' + this.name2
        }
      }
    })
  </script>
</body>
</html>